﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;

namespace CommonsLib.Utility
{
    public class WebFunc
    {
        public static string GetRequestHostUrl()
        {
            string strURL=string.Concat("hhtp://",HttpContext.Current.Request.ServerVariables["HTTP_HOST"],HttpContext.Current.Request.ServerVariables["PATH_INFO"]);
            int iEd = strURL.LastIndexOf('/');
            if(iEd==0)
            {
                return strURL;
            }

            return CvtFunc.ToLeftString(strURL,iEd);
        }
    }
}
